﻿<%@ Page Language="C#" MasterPageFile="~/MasterAdmin.Master" AutoEventWireup="true" CodeBehind="QuanLySanPham.aspx.cs" Inherits="EC21_EDiamond.QuanLySanPham" %>

<asp:Content ID="Content1" runat="server" contentplaceholderid="HeadContent">
   
    <asp:GridView ID="gvDSSanPham" runat="server" AllowPaging="True" AutoGenerateColumns="False" Height="184px" Width="100%" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Horizontal" OnPageIndexChanging="gvDSSanPham_PageIndexChanging" OnRowEditing="gvDSSanPham_RowEditing">
        <Columns>
            <asp:TemplateField HeaderText="Mã SP">
                <ItemTemplate>
                    <asp:Label ID="lbMaSP" runat="server" Text='<%# Eval("MaSP") %>'></asp:Label>                    
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Tên sản phẩm">
                <ItemTemplate>
                    <asp:Label ID="lbTenSP" Text='<%# Eval("TenSP") %>' runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Mô tả">
                <ItemTemplate>
                    <asp:Label ID="lbMoTa" runat="server" Text='<%# Eval("MoTa") %>'></asp:Label>                     
                </ItemTemplate>
                <FooterStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Loại đá">
                <ItemTemplate>
                    <asp:Label ID="lbLoaiDa" runat="server" Width="100px" Text='<%# Eval("LoaiDa") %>'></asp:Label>                     
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Trọng lượng">
                <ItemTemplate>
                    <asp:Label ID="lbTrongLuong" runat="server" style="text-align:center" Text='<%# Eval("TrongLuong") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Giá gốc">
                <ItemTemplate>
                    <asp:Label ID="lbGiaGoc" runat="server" Text='<%# Eval("GiaGoc") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Giá KM">
                <ItemTemplate>
                    <asp:Label ID="lbGiaKM" runat="server" Text='<%# Eval("GiaKM") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Chất liệu">
                <ItemTemplate>
                    <asp:Label ID="lbChatLieu" runat="server" Text='<%# Eval("ChatLieu") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Số lượng tồn">
                <ItemTemplate>
                    <asp:Label ID="lbSLTon" runat="server" Text='<%# Eval("SLTon") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Danh mục">
                <ItemTemplate>
                    <asp:Label ID="lbDanhMuc" runat="server" Text='<%# Eval("TenDM") %>'></asp:Label>                    
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Thương hiệu">
                <ItemTemplate>
                    <asp:Label ID="lbThuongHieu" runat="server" Text='<%# Eval("TenTH") %>'></asp:Label>
                    <asp:Label ID="lbViewed" runat="server" Visible="false" Text='<%# Eval("Viewed") %>'></asp:Label>
                    <asp:Label ID="lbIsIndex" runat="server" Visible="false" Text='<%# Eval("IsIndex") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="Hình 1">
                <ItemTemplate>
                    <asp:Image ID="Image1" src='<%# Eval("HinhAnh") %>' width="50px" height="50px" runat="server" />              
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Hình 2">
                <ItemTemplate>
                    <asp:Image ID="Image2" src='<%# Eval("HinhAnh2") %>' width="50px" height="50px" runat="server" />              
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Hình 3">
                <ItemTemplate>
                    <asp:Image ID="Image3" src='<%# Eval("HinhAnh3") %>' width="50px" height="50px" runat="server" />              
                </ItemTemplate>
            </asp:TemplateField>
            
            <asp:CommandField CausesValidation="False" InsertVisible="False" ShowCancelButton="False" ShowEditButton="True" UpdateText="Edit" />
        </Columns>
        <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
        <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F7F7F7" />
        <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
        <SortedDescendingCellStyle BackColor="#E5E5E5" />
        <SortedDescendingHeaderStyle BackColor="#242121" />
    </asp:GridView>
</asp:Content>


